<?php

function assertEquals($value1, $value2, $message = ' '){
	if($value1 == $value2){
		echo '<span style="background-color:green">' . "ok" . "<br/>" . $message . "<br/>". '</span>';
	} else{
		echo '<span style="background-color:red">' . "[$value1] is not equal to <br/>[$value2] : <br/>" . $message . "<br/>". '</span>';
	}
}
function assertAlmostEquals($value1, $value2, $message = ' ', $inaccurateFactor){
	if(abs($value1 - $value2) < $inaccurateFactor){
		echo '<span style="background-color:green">' . "ok" . "<br/>" . $message . "<br/>". '</span>';
	} else{
		echo '<span style="background-color:red">' . "[$value1] is not equal to <br/>[$value2] : <br/>" . $message . "<br/>". '</span>';
	}
}
function assertNotNull($value, $message = ' '){
	if(isset($value) && $value != null){
		echo '<span style="background-color:green">' . "ok" . "<br/>" . $message . "<br/>". '</span>';
	} else{
		echo '<span style="background-color:red">' . "no null value expected : <br/>" . $message . "<br/>". '</span>';
	}
}

?>